import { makeAutoObservable } from "mobx";
import { getUserList, isDisabled } from "@/services"
interface IuserList {
  code: number
  disabled: boolean
  gender: string
  houseCount: number
  nickname: string
  phone: null
  username: string
}
interface Iparams {
  id: number,
  disabled: boolean,
}

class UserList {
  constructor() {
    makeAutoObservable(this)
  }
  userList: IuserList[] = [];
  async getUserList(params: any) {
    let result: any = await getUserList(params);
    if (result) {
      this.userList = result.body;
    }
  }

  async isDisabled (params:Iparams){
    let result =await isDisabled(params);
    if(result){
      return result
    }
    
  }
}

export default new UserList;